/*
package com.its.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.its.manager.mapper.PermissionMapper;
import com.its.manager.pojo.Permission;
import com.its.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

*/
/**
* @author lenovo
* @description 针对表【gym_permission】的数据库操作Service实现
* @createDate 2025-04-15 23:33:47
*//*

@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements PermissionService {
    //注入Mapper层属性
    @Autowired
    private PermissionMapper permissionMapper;

    //添加权限
    @Override
    public int addPermissionService(Permission permission) {
        return permissionMapper.insert(permission);
    }

    //修改权限
    @Override
    public int updatePermissionService(Permission permission) {
        return permissionMapper.updateById(permission);
    }

    //删除权限
    @Transactional
    @Override
    public int deletePermissionService(Long pid) {
        return permissionMapper.deleteById(pid);
    }

    //根据Id查询权限
    @Override
    public Permission selectPermissionByIdService(Long pid) {
        return permissionMapper.selectById(pid);
    }

    //分页查询权限信息
    @Override
    public Page<Permission> selectPermissionByPageService(Integer page, Integer size) {
        Page<Permission> permissionPage = permissionMapper.selectPage(new Page<>(page, size), null);
        return permissionPage;
    }

    //查询所有的权限
    @Override
    public List<Permission> getAllPermissionService() {
        return permissionMapper.selectList(null);
    }
}




*/
